package handling.login.handler;

import client.MapleClient;
import handling.login.LoginServer;
import org.apache.mina.core.session.IoSession;
import tools.HexTool;
import tools.MaplePacketCreator;
import tools.packet.LoginPacket;

public class ServerlistRequestHandler {
    public static void handlePacket1(MapleClient c) {
        c.getSession().write(LoginPacket.getEndOfServerList());
    }

    public static void handlePacket(MapleClient c) {
        c.getSession().write(LoginPacket.getLoginWelcome());
        c.getSession().write(LoginPacket.getServerList(0, LoginServer.getLoad()));
        c.getSession().write(LoginPacket.getEndOfServerList());
        c.getSession().write(LoginPacket.sendRecommended(0, null));
        
        
        
        
        //c.getSession().write(LoginPacket.getseverlist_start_end());
        /*c.getSession().write(LoginPacket.getLoginWelcome2());
        byte[] a = LoginPacket.getServerList(2, LoginServer.getLoad());
        c.getSession().write(a);
        c.getSession().write(LoginPacket.getseverlist_start_end());*/
    }
}